#include <bits/stdc++.h>
using namespace std;
int main()
{
	int t;
	cin >> t;
	while(t--)
	{
		int n;
		cin >> n;
		int ans=0;
		for(int i=1;i<=n;i++)
		{
			int x;
			cin >> x;
			ans=ans^x;
		}
		if(ans==0)
		{
			cout << "No"  << endl;
		}
		else if(ans!=0)
		{
			cout << "Yes" << endl;
		}
	}
	return 0;
}
